<%--
  01_jspExample.jsp
  User: PING
  Date: 2022/9/7
  Time: 9:50
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<meta charset="UTF-8">
<head>
    <title>jsp example</title>
    <link rel="stylesheet" href="../css/main.css"/>
    <style>
        .clock {
            font-size:28px;
            text-align: center;
            padding-top:10px;
            height:500px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="logo">
        </div>
        <hr>
        <div class="main">
            <div class="show">
                <h2>演示部分</h2>
                <hr>
                <div class="clock" id="clock">
                </div>
            </div>
        </div>

    </div>
    <footer>
        <div class="copyright">
            JAVA WEB &copy; FJNU
        </div>
    </footer>

    <script type="text/javascript">

        function show_clock() {
            var clock_div = document.getElementById("clock") ;
            var date = new Date() ;
            clock_div.innerHTML = "当前时间： " + date.getHours() + ":" + date.getMinutes()+":" + date.getSeconds() ;
        }

        window.onload = function() {
            window.setInterval("show_clock()",1000) ;
        };


    </script>

</body>
</html>
